package com.cmcc.zysoft.infocollection.model;

// Generated 2013-8-7 20:24:35 by Hibernate Tools 3.2.2.GA

import java.util.Date;
import java.util.HashSet;
import java.util.Set;
import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.OneToMany;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;
import org.hibernate.annotations.GenericGenerator;

/**
 * Headship generated by hbm2java
 */

@Entity
@Table(name = "tb_c_headship")
public class Headship implements java.io.Serializable {

	private static final long serialVersionUID = -7763659551095133632L;
	private String headshipId;
	private String companyId;
	private String headshipName;
	private String description;
	private String headshipLevel;
	private Date createTime;
	private String createMan;
	private Date modifyTime;
	private String modifyMan;
	private String status;
	private String delFlag;
	private Set<Employee> employees = new HashSet<Employee>(0);

	public Headship() {
	}

	public Headship(String headshipId) {
		this.headshipId = headshipId;
	}

	public Headship(String headshipId, String companyId, String headshipName,
			String description, String headshipLevel, Date createTime,
			String createMan, Date modifyTime, String modifyMan, String status,
			String delFlag, Set<Employee> employees) {
		this.headshipId = headshipId;
		this.companyId = companyId;
		this.headshipName = headshipName;
		this.description = description;
		this.headshipLevel = headshipLevel;
		this.createTime = createTime;
		this.createMan = createMan;
		this.modifyTime = modifyTime;
		this.modifyMan = modifyMan;
		this.status = status;
		this.delFlag = delFlag;
		this.employees = employees;
	}

	@GenericGenerator(name = "generator", strategy = "uuid.hex")
	@Id
	@GeneratedValue(generator = "generator")
	@Column(name = "headship_id", unique = true, nullable = false, length = 32)
	public String getHeadshipId() {
		return this.headshipId;
	}

	public void setHeadshipId(String headshipId) {
		this.headshipId = headshipId;
	}

	@Column(name = "company_id", length = 32)
	public String getCompanyId() {
		return this.companyId;
	}

	public void setCompanyId(String companyId) {
		this.companyId = companyId;
	}

	@Column(name = "headship_name", length = 64)
	public String getHeadshipName() {
		return this.headshipName;
	}

	public void setHeadshipName(String headshipName) {
		this.headshipName = headshipName;
	}

	@Column(name = "description", length = 1024)
	public String getDescription() {
		return this.description;
	}

	public void setDescription(String description) {
		this.description = description;
	}

	@Column(name = "headship_level", length = 1)
	public String getHeadshipLevel() {
		return this.headshipLevel;
	}

	public void setHeadshipLevel(String headshipLevel) {
		this.headshipLevel = headshipLevel;
	}

	@Temporal(TemporalType.TIMESTAMP)
	@Column(name = "create_time", length = 19)
	public Date getCreateTime() {
		return this.createTime;
	}

	public void setCreateTime(Date createTime) {
		this.createTime = createTime;
	}

	@Column(name = "create_man", length = 32)
	public String getCreateMan() {
		return this.createMan;
	}

	public void setCreateMan(String createMan) {
		this.createMan = createMan;
	}

	@Temporal(TemporalType.TIMESTAMP)
	@Column(name = "modify_time", length = 19)
	public Date getModifyTime() {
		return this.modifyTime;
	}

	public void setModifyTime(Date modifyTime) {
		this.modifyTime = modifyTime;
	}

	@Column(name = "modify_man", length = 32)
	public String getModifyMan() {
		return this.modifyMan;
	}

	public void setModifyMan(String modifyMan) {
		this.modifyMan = modifyMan;
	}

	@Column(name = "status", length = 1)
	public String getStatus() {
		return this.status;
	}

	public void setStatus(String status) {
		this.status = status;
	}

	@Column(name = "del_flag", length = 1)
	public String getDelFlag() {
		return this.delFlag;
	}

	public void setDelFlag(String delFlag) {
		this.delFlag = delFlag;
	}

	@OneToMany(cascade = CascadeType.ALL, fetch = FetchType.LAZY, mappedBy = "headship")
	public Set<Employee> getEmployees() {
		return this.employees;
	}

	public void setEmployees(Set<Employee> employees) {
		this.employees = employees;
	}

}
